<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <base href="<%=basePath%>">
    
	<%@include file="/jsp/common/jspCommonHeadSetting.jsp"%>
	<%@include file="/jsp/common/adminCommonHeadSetting.jsp"%>
	<title>network</title>
  </head>
  
  <body>
  <div id="wrap">
  	<%@include file="/jsp/common/header.jsp"%>
    <div id="content">
    	<%@include file="/jsp/common/adminLeftContent.jsp"%>
    	<div id="right_content">
     <table>
       <tr>	
          <th>用户名</th>
          <th>姓名</th>
          <th>学校</th>
          <th>学院</th>
          <th>email</th>
          <th>注册时间</th>
          <th>角色</th>
          <th>操作</th>
       </tr>
       <s:iterator value="userArr">
	       <tr>
	          <td class="row_list"><s:property value="userName"/></td>
	          <td class="row_list"><s:property value="name"/></td>
	          <td class="row_list"><s:property value="school"/></td>
	          <td class="row_list"><s:property value="college"/></td>
	          <td class="row_list"><s:property value="email"/></td>
	          <td class="row_list"><s:date name="createDate" format="yyyy/MM/dd"/></td>  
	          <td class="row_list">
	          	<c:if test="${role=='U'}">普通帐号</c:if>
		      	<c:if test="${role=='A'}">管理帐号</c:if>
	          </td>
	          <td class="row_list">
	              <a href="<s:url action="getUserById" namespace="/admin"/>?username=<s:property value="userName"/>">修改</a>
				  <a href="<s:url action="deleteUserById" namespace="/admin"/>?username=<s:property value="userName"/>">删除</a>
	          </td>                                        
	       </tr>          
       </s:iterator>
     </table>
     </div>
     <div id="page_nav">
     <a href="<s:url action="getPrePage" namespace="/admin"/>">上一页</a>
     	 &nbsp;&nbsp;
     <a href="<s:url action="getNextPage" namespace="/admin"/>">下一页</a>
     </div>
		</div>
    </div>
  </div>
  </body>
</html>